﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfDjackVehicleInfo.aspx.cs" Inherits="msBsc.WebUi.wMall.Seller.wfDjackVehicleInfo" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>地接客车辆信息</title>
    <link href="/themes/wStyle1/css/sLayout.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sHead.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sFoot.css" rel="stylesheet" />
    <link href="/jqPlugin/laydate/skins/default/laydate.css" rel="stylesheet" />
    <link href="/jqPlugin/SelectSimu/css/base.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/from.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/Seller/sDjackVehicleInfo.css" rel="stylesheet" />

    <link href="/themes/wStyle1/css/usermenu.css" rel="stylesheet" />
</head>
<body>
    <div class="wf_all">
        <input type="hidden" id="vehicleId" />
        <div id="divLoginInfo">
            <%=msBsc.WebUi.Code.QtHtmlGet.GetHeaderLoginInfo() %>
        </div>
        <div class="main-container">
            <div class="sidebar-scroll">
                <%=msBsc.WebUi.Code.QtHtmlGet.GetDjackMenuHtml() %>
            </div>
            <div class="main-Info">
                <div class="tnavigation">
                    <a class="nav" href="#">我的地接客</a>&gt;
				        <a class="nav" href="#">车辆管理</a>&gt;
				        <a class="nav-on" href="#">车辆信息</a>
                </div>
                <hr />
                <ul class="main-horizontal view">
                    <!-- BEGIN 车辆图片 -->
                    <li>
                        <span class="control-span">车辆图片</span>
                        <div class="controls">
                            <div class="imgcontainer" id="imgHead">
                            </div>
                        </div>
                    </li>
                    <!-- END 车辆图片 -->
                    <!-- BEGIN 车辆名称 -->
                    <li>
                        <span class="control-span">车辆名称</span>
                        <div class="controls" id="carNameControls">
                        </div>
                    </li>
                    <!-- END 车辆名称 -->

                    <!-- BEGIN 车辆购买时间 -->
                    <li>
                        <span class="control-span">购买时间</span>
                        <div class="controls" id="uetoTimeControls">
                        </div>
                    </li>
                    <!-- END 车辆购买时间 -->

                    <!-- BEGIN 车辆车辆状态 -->
                    <li>
                        <span class="control-span">车辆状态</span>
                        <div class="controls" id="vehivleStatus">
                        </div>
                    </li>
                    <!-- END 车辆车辆状态 -->

                    <!-- BEGIN 车辆未通过原因 -->
                    <li>
                        <span class="control-span">未通过原因</span>
                        <div class="controls" id="nopassReason">
                        </div>
                    </li>
                    <!-- END 车辆未通过原因 -->

                    <!-- BEGIN 车辆座位数 -->
                    <li>
                        <span class="control-span">座位数(座)</span>
                        <div class="controls" id="numberSeatsControls">
                        </div>
                    </li>
                    <!-- END 车辆座位数 -->

                    <!-- BEGIN 车辆价格 -->
                    <li>
                        <span class="control-span">价格(元/天起)</span><div class="controls" id="carPriceControls">
                        </div>
                    </li>
                    <!-- END 车辆价格 -->

                    <!-- BEGIN 所在地 -->
                    <li>
                        <span class="control-span">所在地</span>
                        <div class="controls" id="location">
                            <span id="country" data-value=""></span>
                            <span id="city" data-value=""></span>
                            <span id="destion" data-value=""></span>
                        </div>
                    </li>
                    <!-- END 所在地 -->

                    <!-- BEGIN 服务范围 -->
                    <li>
                        <span class="control-span">服务范围</span><div class="controls" id="serviceRangeControls">
                        </div>
                    </li>
                    <!-- END 服务范围 -->

                    <!-- BEGIN 车辆类型 -->
                    <li>
                        <span class="control-span">车辆类型</span><div class="controls" id="carTypeControls">
                        </div>
                    </li>
                    <!-- END 车辆类型 -->

                    <!-- BEGIN 车辆品牌 -->
                    <li>
                        <span class="control-span">车辆品牌</span><div class="controls" id="carBrandControls">
                        </div>
                    </li>
                    <!-- END 车辆品牌 -->

                    <!-- BEGIN 车辆颜色 -->
                    <li>
                        <span class="control-span">车辆颜色</span>
                        <div class="controls" id="carColorControls">
                        </div>
                    </li>
                    <!-- END 车辆颜色 -->

                    <!-- BEGIN 服务类型 -->
                    <li>
                        <span class="control-span">服务类型</span><div class="controls" id="serviceTypeControls">
                        </div>
                    </li>
                    <!-- END 服务类型 -->

                    <!-- BEGIN 车辆简介 -->
                    <li>
                        <span class="control-span">车辆简介</span><div class="controls" id="carIntroductionControls">
                        </div>
                    </li>
                    <!-- END 车辆简介 -->

                    <!-- BEGIN 购买须知 -->
                    <li>
                        <span class="control-span">购买须知</span><div class="controls" id="purchaseNotesControls">
                        </div>
                    </li>
                    <!-- END 购买须知 -->

                    <!-- BEGIN 添加车辆按钮 -->
                    <li class="form-actions" id="editButton">
                        <span class="up-btn2 tm-skin-yellow2" onclick="modifyView();">编 辑</span>
                    </li>
                    <!-- END 添加车辆按钮 -->
                </ul>
                <ul class="main-horizontal edit" style="display: none;">
                    <!-- BEGIN 车辆图片 -->
                    <li>
                        <span class="control-span">车辆图片<span class="required">*</span></span>
                        <div class="controls">
                            <div style="display: inline; float: left;">
                                <table border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <div style="" id="logo_img_selected">
                                                <img id="uHeadImg" src="/themes/Style1/Image/u_head_110x110.png" for="" />
                                            </div>
                                        </td>
                                        <td style="padding: 3px;">
                                            <div style="padding: 5px;">
                                                <a id="btnupImg" target="_self" value="上传图片" style="margin: 6px; cursor: pointer;" onclick="javascript:return false;">上传图片</a>
                                                <p>
                                                    建议图片大小： 220 x 110 (像素)，文件大小不能大于1M
                                                </p>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div id="carImgMessage" class="help-inline"></div>
                        </div>
                    </li>
                    <!-- END 车辆图片 -->

                    <!-- BEGIN 车辆名称 -->
                    <li>
                        <span class="control-span">车辆名称<span class="required">*</span></span><div class="controls">
                            <input type="text" id="carName" class="input" />
                            <span id="carNameMessage" class="help-inline"></span>
                        </div>
                    </li>
                    <!-- END 车辆名称 -->

                    <!-- BEGIN 车辆购买时间 -->
                    <li>
                        <span class="control-span">购买时间<span class="required">*</span></span><div class="controls">
                            <input type="text" id="uetoTime" class="input laydate-icon" style="width: 218px" onclick="laydate()" />
                            <span id="uetoTimeMessage" class="help-inline"></span>
                        </div>
                    </li>
                    <!-- END 车辆购买时间 -->

                    <!-- BEGIN 车辆座位数 -->
                    <li>
                        <span class="control-span">座位数(座)<span class="required">*</span></span><div class="controls">
                            <input type="text" id="numberSeats" class="input" />
                            <span id="numberSeatsMessage" class="help-inline"></span>
                        </div>
                    </li>
                    <!-- END 车辆座位数 -->

                    <!-- BEGIN 车辆价格 -->
                    <li>
                        <span class="control-span">价格(元/天起)<span class="required">*</span></span><div class="controls">
                            <input type="text" id="carPrice" class="input" />
                            <span id="carPriceMessage" class="help-inline"></span>
                        </div>
                    </li>
                    <!-- END 车辆价格 -->

                    <!-- BEGIN 服务范围 -->
                    <li>
                        <span class="control-span">服务范围<span class="required">*</span></span><div class="controls">
                            <input type="text" id="serviceRange" class="input" />
                            <span id="serviceRangeMessage" class="help-inline"></span>
                        </div>
                    </li>
                    <!-- END 服务范围 -->

                    <!-- BEGIN 车辆所属地 -->
                    <li>
                        <span class="control-span">所属地区<span class="required">*</span></span><div class="controls">
                            <div id="country_select" class="select selectFloat selectArea"></div>
                            <div id="city_select" class="select selectFloat selectArea"></div>
                            <div id="destion_select" class="select selectFloat selectArea"></div>
                            <span id="areaMessage" class="help-inline"></span>
                        </div>
                    </li>
                    <!-- END 车辆所属地 -->

                    <!-- BEGIN 车辆类型 -->
                    <li>
                        <span class="control-span">车辆类型<span class="required">*</span></span><div class="controls">
                            <div id="carType" class="select selectFloat"></div>
                            <span id="carTypeMessage" class="help-inline selectFloat"></span>
                        </div>
                    </li>
                    <!-- END 车辆类型 -->

                    <!-- BEGIN 车辆品牌 -->
                    <li>
                        <span class="control-span">车辆品牌<span class="required">*</span></span><div class="controls">
                            <div id="carBrand" class="select selectFloat"></div>
                            <span id="carBrandMessage" class="help-inline selectFloat"></span>
                        </div>
                    </li>
                    <!-- END 车辆品牌 -->

                    <!-- BEGIN 车辆颜色 -->
                    <li>
                        <span class="control-span">车辆颜色<span class="required">*</span></span><div class="controls">
                            <div id="carColor" class="select selectFloat"></div>
                            <span id="carColorMessage" class="help-inline selectFloat"></span>
                        </div>
                    </li>
                    <!-- END 车辆颜色 -->

                    <!-- BEGIN 服务类型 -->
                    <li>
                        <span class="control-span">服务类型<span class="required">*</span></span><div class="controls">
                            <div id="serviceType" class="select selectFloat"></div>
                            <span id="serviceTypeMessage" class="help-inline selectFloat"></span>
                        </div>
                    </li>
                    <!-- END 服务类型 -->

                    <!-- BEGIN 车辆简介 -->
                    <li>
                        <span class="control-span">车辆简介<span class="required">*</span></span><div class="controls">
                            <textarea id="carIntroduction" class="textarea-large"></textarea>
                            <span id="carIntroductionMessage" class="help-inline"></span>
                        </div>
                    </li>
                    <!-- END 车辆简介 -->

                    <!-- BEGIN 购买须知 -->
                    <li>
                        <span class="control-span">购买须知<span class="required">*</span></span><div class="controls">
                            <textarea id="purchaseNotes" class="textarea-large"></textarea>
                            <span id="purchaseNotesMessage" class="help-inline"></span>
                        </div>
                    </li>
                    <!-- END 购买须知 -->

                    <!-- BEGIN 添加车辆按钮 -->
                    <li class="form-actions" id="Li1">
                        <span class="up-btn2 tm-skin-red2" onclick="saveVehicleInfo();">保 存</span>
                        <span class="up-btn2 tm-skin-Grey2" onclick="cancelEdit();">取 消</span>
                    </li>
                    <!-- END 添加车辆按钮 -->
                </ul>

            </div>

        </div>
        <!--start JS引用-->
        <script src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
        <script src="/jqPlugin/js/jBase.js"></script>
        <script src="/jqPlugin/js/jBPage.js"></script>
        <script src="/jqPlugin/js/laytpl.js"></script>
        <script src="/jqPlugin/laydate/laydate.js"></script>
        <script src="/jqPlugin/SelectSimu/js/SelectSimu.js"></script>
        <script src="/themes/wStyle1/js/comm/VerifyJs.js"></script>
        <script src="/themes/wStyle1/js/comm/DateInfo.js"></script>

        <script src="/jqPlugin/SelectSimu/js/SelectSimu.js"></script>
        <script src="/themes/wStyle1/js/comm/jsLayout.js"></script>
        <!--end JS引用-->
        <script type="text/javascript">
            var parentsId = "00000000-0000-0000-0000-000000000000";
            var currentCountry = "";
            var currentCity = "";
            (function () {
                $("#vehicleId").val(GetQueryStr("vehicleId"));


                var listNum = [1, 2, 3];
                var listName = ["司机兼导游", "司机兼向导", "专职司机+专业导游"];
                setArea("serviceType", 234, 2, listNum.length, listNum, listName);
                $('#country_select .selectList li').live('click', function () {
                    var outerInnerId = this.getAttribute('data-value');
                    if (currentCountry == outerInnerId) {
                        return;
                    }
                    currentCountry = outerInnerId;
                    parentsId = outerInnerId;
                    btnDo("getArea2");
                });
                $('#city_select .selectList li').live('click', function () {
                    var provinceId = this.getAttribute('data-value');
                    if (provinceId == currentCity) {
                        return;
                    }
                    currentCity = provinceId;
                    parentsId = provinceId;
                    btnDo("getArea3");
                });
            })();
            function btnDo(sEbtn) {
                GtGrid1Action = sEbtn;
                var opart = GetGtParam();
                if (sEbtn == "getArea3" || sEbtn == "getArea2") {
                    opart.AddCell("parentsId", parentsId)
                }
                ajaxComm(opart);
            };

            //执行AJAX调用时获取参数
            function GetGtParam() {
                var _jsParam = new jsonRow();
                _jsParam.AddCell("vehicleId", $("#vehicleId").val());
                _jsParam.AddCell("ACTION", GtGrid1Action);
                return _jsParam;
            };
            btnDo("init");

            //实例化地区列表
            function setArea(input, width, zIndex, listNum, listValue, listOption, valueId, valueName) {
                $("#" + input).SelectSimu({
                    width: width,
                    zIndex: zIndex,
                    listNum: listNum,
                    listValue: listValue,
                    listOption: listOption,
                    imgSrc: '/jqPlugin/SelectSimu/img/icon_down.png'
                });
                $("#" + input + " input").val(valueId);
                $("#" + input + " span").text(valueName);
            }

            //更新地区下拉列表
            function updateSelet(inputId, data) {
                var selectValue = $("#" + inputId + " .selectList ul");
                selectValue.html("");
                for (var i = 0; i < data.rows.length; i++) {
                    selectValue.append('<li data-value="' + data.rows[i].COUNTRY_CITY_ID + '">' + data.rows[i].COUNTRY_CITY_NME + '</li>');
                }
                if (data.rows.length > 0) {
                    $("#" + inputId + " input").val(data.rows[0].COUNTRY_CITY_ID);
                    $("#" + inputId + " span").text(data.rows[0].COUNTRY_CITY_NME);
                }
            }

            //初始车辆户信息
            function getVehicleInfo(data) {
                if (IsNull(data)) {
                    return;
                }
                $("#carNameControls").text(data.rows[0].VEHICLE_NAME);
                $("#uetoTimeControls").text(formatDate(new Date(data.rows[0].VEHICLE_BUY_TIME), false));
                if (data.rows[0].VEHICLE_STATUS == "3") {
                    $("#vehivleStatus").css("color", "Red");
                    $("#nopassReason").text(data.rows[0].VEHICLE_NOPASS_REASON);
                }
                else {
                    $("#nopassReason").parent().hide()
                }
                $("#vehivleStatus").text(data.rows[0].VEHICLE_STATUS_NAME);
                $("#numberSeatsControls").text(data.rows[0].VEHICLE_SEATS);
                $("#carPriceControls").text(getNumber(data.rows[0].VEHICLE_PRICE_DAY));
                $("#serviceRangeControls").text(data.rows[0].VEHICLE_SERVICE_AREA);
                //// <span id="country" data-value="></span><span id="province" data-value="></span><span id="city" data-value="></span>
                $("#country").text(data.rows[0].COUNTRYNAME);
                $("#country").attr("data-value", data.rows[0].VEHICLE_COUNTRY);
                $("#city").text(data.rows[0].CITYNAME);
                $("#city").attr("data-value", data.rows[0].VEHICLE_CITY);
                $("#destion").text(data.rows[0].DESTINNAME);
                $("#destion").attr("data-value", data.rows[0].VEHICLE_DESTINATION);
                $("#carTypeControls").html("<span data-value='" + data.rows[0].VEHICLE_TYPE + "'>" + data.rows[0].VEHICLE_TYPE_NAME + "</span>");
                $("#carBrandControls").html("<span data-value='" + data.rows[0].VEHICLE_BRAND + "'>" + data.rows[0].VEHICLE_BRAND_NAME + "</span>");
                $("#carColorControls").html("<span data-value='" + data.rows[0].VEHICLE_COLOR + "'>" + data.rows[0].VEHICLE_COLOR_NAME + "</span>");
                $("#serviceTypeControls").html("<span data-value='" + data.rows[0].VEHICLE_SERVICE_TYPE + "'>" + data.rows[0].VEHICLE_SERVICE_TYPE_NAME + "</span>");
                var carImg = data.rows[0].VEHICLE_DEFAULT_PIC;
                if (!IsNull(carImg)) {
                    $("#imgHead").html("<img src='" + carImg + "' />");
                }
                //$(".uploadbox").attr("data-count", "1");
                $("#carIntroductionControls").text(data.rows[0].VEHICLE_INTRO);
                $("#purchaseNotesControls").text(data.rows[0].ORDER_SHOULD_KNOW);
            }

            function modifyView() {
                $(".view").hide();
                $(".edit").show();
                $("#carName").val($("#carNameControls").text());
                $("#uetoTime").val($("#uetoTimeControls").text());
                $("#numberSeats").val($("#numberSeatsControls").text());
                $("#serviceRange").val($("#serviceRangeControls").text());
                $("#carPrice").val($("#carPriceControls").text());
                $("#carIntroduction").val($("#carIntroductionControls").text());
                $("#purchaseNotes").val($("#purchaseNotesControls").text());

                var vehicleTypeName = $("#carTypeControls span").text();
                var vehicleType = $("#carTypeControls span").attr("data-value");
                var vehicleBrandName = $("#carBrandControls span").text();
                var vehicleBrand = $("#carBrandControls span").attr("data-value");
                var vehicleColorName = $("#carColorControls span").text();
                var vehicleColor = $("#carColorControls span").attr("data-value");
                if (IsNull($("#city_select").html())) {
                    var countryName = $("#country").text();
                    var country = $("#country").attr("data-value");
                    var cityName = $("#city").text();
                    var city = $("#city").attr("data-value");
                    var destionName = $("#destion").text();
                    var destion = $("#destion").attr("data-value");

                    var opart = new jsonRow();
                    opart.AddCell("ACTION", "initCity");
                    opart.AddCell("parentsId", parentsId);
                    opart.AddCell("countryName", countryName);
                    opart.AddCell("country", country);
                    opart.AddCell("cityName", cityName);
                    opart.AddCell("city", city);
                    opart.AddCell("destionName", destionName);
                    opart.AddCell("destion", destion);
                    opart.AddCell("vehicleTypeName", vehicleTypeName);
                    opart.AddCell("vehicleType", vehicleType);
                    opart.AddCell("vehicleBrandName", vehicleBrandName);
                    opart.AddCell("vehicleBrand", vehicleBrand);
                    opart.AddCell("vehicleColorName", vehicleColorName);
                    opart.AddCell("vehicleColor", vehicleColor);
                    ajaxComm(opart);
                }
                $("#carType input").val(vehicleType);
                $("#carType span").text(vehicleTypeName);
                $("#carBrand input").val(vehicleBrand);
                $("#carBrand span").text(vehicleBrandName);
                $("#carColor input").val(vehicleColor);
                $("#carColor span").text(vehicleColorName);
                var serviceTypeName = $("#serviceTypeControls span").text();
                var serviceType = $("#serviceTypeControls span").attr("data-value");
                $("#serviceType input").val(serviceType);
                $("#serviceType span").text(serviceTypeName);

                $.ploadFile("kindeditor", function (script, textStatus) {
                    $.setUploadFile('btnupImg', { FileId: '', RelId: "", rType1: '0', rType2: '' }, function (data) {
                        if (data.url) {
                            $('#logo_img_selected').empty().html('<img alt="" src="' + data.url + '" for="' + data.url + '">');
                        }
                    });
                });
                var vehicleImg = $("#imgHead img").attr("src");
                $("#uHeadImg").attr("src", vehicleImg);
                $("#uHeadImg").attr("for", vehicleImg);
            }
            function cancelEdit() {
                $(".view").show();
                $(".edit").hide();
            }

            function saveVehicleInfo() {
                //验证车名
                var carName = $("#carName").val();
                if (!vfcCarName(carName)) {
                    return;
                }
                //验证上户时间
                var uetoTime = $("#uetoTime").val();
                if (!vfcUetoTime(uetoTime)) {
                    return;
                }
                //验证车辆座位数
                var numberSeats = $("#numberSeats").val();
                if (!vfcSeats(numberSeats)) {
                    return;
                }
                //验证价格
                var carPrice = $("#carPrice").val();
                if (!vfcPrice(carPrice)) {
                    return;
                }
                //验证服务范围
                var servicesRange = $("#serviceRange").val();
                if (!vfcRange(servicesRange)) {
                    return;
                }
                //验证车辆类型
                var carType = $("#carType input").val();
                if (!vfcCarType(carType)) {
                    return;
                }
                //验证车辆品牌
                var carBrand = $("#carBrand input").val();
                if (!vfcBrand(carBrand)) {
                    return;
                }
                //验证车辆颜色
                var carColor = $("#carColor input").val();
                if (!vfcColor(carColor)) {
                    return;
                }
                //验证服务类型
                var serviceType = $("#serviceType input").val();
                if (!vfcServiceType(serviceType)) {
                    return;
                }
                //验证图片 
                var carImg = $("#logo_img_selected img").attr("for");
                if (!vfcImg(carImg)) {
                    return;
                }
                //var arrVehicleImg = carImg.split("/");
                //var carImg = arrVehicleImg[arrVehicleImg.length - 1];
                //验证简介
                var carIntroduction = $("#carIntroduction").val();
                if (!vfcIntroduction(carIntroduction)) {
                    return;
                }
                //验证购买须知
                var purchaseNotes = $("#purchaseNotes").val();
                if (!vfcNotes(purchaseNotes)) {
                    return;
                }

                //验证车辆所属地
                var countryId = "";//境内外
                var cityId = "";//省份
                var destionId = "";//市
                countryId = $("#country_select input").val();
                cityId = $("#city_select input").val();
                destionId = $("#destion_select input").val();
                if (!vfcCarArea(countryId) || !vfcCarArea(cityId) || !vfcCarArea(destionId)) {
                    return;
                }
                var vehicleId = $("#vehicleId").val();

                var opart = new jsonRow();
                opart.AddCell("vehicleId", vehicleId);
                opart.AddCell("carName", carName);
                opart.AddCell("uetoTime", uetoTime);
                opart.AddCell("numberSeats", numberSeats);
                opart.AddCell("carPrice", carPrice);
                opart.AddCell("servicesRange", servicesRange);
                opart.AddCell("carType", carType);
                opart.AddCell("carBrand", carBrand);
                opart.AddCell("carColor", carColor);
                opart.AddCell("serviceType", serviceType);
                opart.AddCell("carImg", carImg);
                opart.AddCell("carIntroduction", carIntroduction);
                opart.AddCell("purchaseNotes", purchaseNotes);
                opart.AddCell("countryId", countryId);
                opart.AddCell("cityId", cityId);
                opart.AddCell("destionId", destionId);
                opart.AddCell("ACTION", "saveVehicle");
                ajaxComm(opart);
            }

            //验证车名
            function vfcCarName(carName) {
                if (IsNull(carName)) {
                    alert("车名不能为空");
                    return false;
                }
                if (!isEnLength(carName, 0, 40)) {
                    alertt("车名最大长度为40个字符，中文算2个字符");
                    return false;
                }
                return true;
            }

            //验证车辆所属地
            function vfcCarArea(areaId) {
                if (IsNull(areaId)) {
                    alert("所属地区不能为空");
                    return false;
                }
                return true;
            }

            //验证上户时间
            function vfcUetoTime(uetoTime) {
                if (IsNull(uetoTime)) {
                    alert("购买时间不能为空");
                    return false;
                }
                if (!isdate(uetoTime)) {
                    alert("购买时间只能是日期");
                    return false;
                }
                return true;
            }

            //验证车辆类型
            function vfcCarType(carType) {
                if (IsNull(carType)) {
                    alert("车辆类型不能为空");
                    return false;
                }
                return true;
            }

            //验证车辆座位数
            function vfcSeats(numberSeats) {
                if (IsNull(numberSeats)) {
                    alert("车辆座位数不能为空");
                    return false;
                }
                if (!NonzeroPositiveInt(numberSeats)) {
                    alert("车辆座位数只能是正整数");
                    return false;
                }
                return true;
            }

            //验证服务范围
            function vfcRange(serviceRange) {
                if (IsNull(serviceRange)) {
                    alert("服务范围不能为空");
                    return false;
                }
                if (!islength(serviceRange, 0, 200)) {
                    alert("服务范围最大长度为200个字符");
                    return false;
                }
                return true;
            }

            //验证服务类型
            function vfcServiceType(serverType) {
                if (IsNull(serverType)) {
                    alert("服务类型不能为空");
                    return false;
                }
                return true;
            }

            //验证车辆品牌
            function vfcBrand(carBrand) {
                if (IsNull(carBrand)) {
                    alert("车辆品牌不能为空");
                    return false;
                }
                return true;
            }

            //验证价格
            function vfcPrice(carPrice) {
                if (IsNull(carPrice)) {
                    alert("价格不能为空");
                    return false;
                }
                if (!IsPositiveFloat(carPrice)) {
                    alert("价格只能是两位小数的数字");
                    return false;
                }
                return true;
            }

            //验证颜色
            function vfcColor(carColor) {
                if (IsNull(carColor)) {
                    alert("车辆颜色不能为空");
                    return false;
                }
                return true;
            }

            //验证车辆图片
            function vfcImg(carImg) {
                if (IsNull(carImg)) {
                    alert("车辆图片不能为空");
                    return false;
                }
                return true;
            }

            //验证车辆简介
            function vfcIntroduction(carIntroduction) {
                if (IsNull(carIntroduction)) {
                    alert("车辆简介不能为空");
                    return false;
                }
                if (!islength(carIntroduction, 0, 500)) {
                    alert("车辆简介最大只能有500个字符");
                    return false;
                }
                return true;
            }

            //验证购买须知
            function vfcNotes(purchaseNotes) {
                if (IsNull(purchaseNotes)) {
                    alert("购买须知不能为空");
                    return false;
                }
                if (!islength(purchaseNotes, 0, 1000)) {
                    alert("购买须知最大只能有1000个字符");
                    return false;
                }
                return true;
            }
        </script>
        <%=msBsc.WebUi.Code.QtHtmlGet.GetFloorHtml() %>
    </div>
</body>
</html>
